
<style media="print">
    @page {
        size: auto;  /* auto is the initial value */
        margin: 0mm; /* this affects the margin in the printer settings */
    }
</style>

<style>
    .form-copy {
        width: 200px;
        margin-right: 5px;
        border-radius: 0;
        box-shadow: none;
        padding: 4px 12px 7px 12px;
        font-size: 14px;
        line-height: 1.42857143;
        color: #555;
        border: 1px solid #ccc;
        transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    }

    td{
        border: 1px black solid;
    }
    label{
        margin-bottom: 1px;
    }
    .label-left{
        width: 16%;
        text-align: center;
    }
    .label-right{
        text-align: center;
    }
</style>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<form>
    <div class="box box-solid no-margin box-show">
        <div class="box-body">
            {{--@include('products.material-print.print')--}}
            <table class="table" border="1" style="border-collapse:collapse;">
                <tbody>
                <tr>
                    <td colspan="4" style="margin-top: 5px; display: block;">
                        <h3 style="font-weight: bolder; text-align: center; margin-top: 20px; margin-bottom: 20px;">
                            UNIGEAR材料质地样（QUALITY SAMPLE）
                        </h3>
                    </td>
                </tr>

                <tr>
                    <td class="label-left">
                        <label>面料厂<br>SUPPLY</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->supplier->name ?? '' }} </td>

                    <td class="label-right">
                        <label>面料编号<br>FABRIC CODE</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->material->material_code ?? '' }} </td>
                </tr>

                <tr>
                    <td class="label-left">
                        <label>面料名称<br>FABRIC NAME</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->material->title ?? '' }} </td>

                    <td class="label-right">
                        <label>纱支<br>YARN COUNT</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->yarn_count ?? '' }} </td>
                </tr>

                <tr>
                    <td class="label-left">
                        <label>功能性<br>FUNCTION</label>
                    </td>
                    <?php
                    $functionStr = '';
                    if ($model->function) {
                        $data = [];
                        foreach ($model->function as $key => $val){
                            $data[$key] = App\Models\Product\ProductSupplierM::$_function[$val];
                        }
                        $functionStr = implode(',', $data);
                    }
                    ?>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $functionStr }}</td>

                    <td class="label-right">
                        <label>门幅<br>WIDTH</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->door_width ?? '' }} </td>
                </tr>

                <tr>
                    <td class="label-left">
                        <label>大货周期<br>LEADTIME</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->cylce ?? '' }} </td>

                    <td class="label-right">
                        <label>克重<br>WEIGHT</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->weight ?? '' }} </td>
                </tr>

                <tr>
                    <td class="label-left">
                        <label>大货<br>MOQ</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->moq ?? '' }} </td>

                    <td class="label-right">
                        <label>规格<br>SPECIFICATION</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->material->specification ?? '' }} </td>
                </tr>

                <tr>
                    <td  class="label-left">
                        <label>审核日期<br>AUDIT DATE</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->audit_time ?? '' }} </td>

                    <td class="label-right">
                        <label>报价<br>PRICE</label>
                    </td>
                    <td style="width: 40%; vertical-align: middle;"> &nbsp;{{ $model->quote_price ?? '' }} </td>
                </tr>

                <tr style="height: 950px;">
                    <td colspan="4" style="display: block;"></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</form>
